home *** CD-ROM | disk | FTP | other *** search
Wrap
#!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html>\n" ; print "\n" ; print "<head>\n" ; print "<title>$ENV{'SERVER_NAME'} CGI Script Help File</title>\n" ; print "</head>\n" ; print "\n" ; print "<body bgcolor=\"#000000\" text=\"#C0C0C0\" link=\"#FFFFFF\" vlink=\"#FFFFFF\" alink=\"#FFFFFF\">\n" ; print "\n" ; print "<p align=\"center\"><font face=\"Verdana\"><br>\n" ; print "Dot Matrix CGI Script Help File</p>\n" ; print "<div align=\"center\"><center>\n" ; print "\n" ; print "<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" width=\"75%\" bordercolor=\"#C0C0C0\">\n" ; print "<tr>\n" ; print "<td bgcolor=#C0C0C0><BR><CENTER><B><font color=#000000>Basic Configuration Information</B></font></CENTER><p></td></tr>\n" ; print "<tr>\n" ; print "<td><font color=\"#C0C0C0\" face=\"Verdana\">Your path to Perl is correct.<br>\n" ; print "Your server is running Perl version<p>\n" ; print "<strong> $] </strong></font><p></td>\n" ; print "</tr>\n" ; print "<tr>\n" ; print "<td>Your domain name is<p>\n" ; print "<strong> $ENV{'SERVER_NAME'} </strong></p>\n" ; print "<p></td>\n" ; print "</tr>\n" ; print "<tr>\n" ; print "<td>The complete system path to this script is:<p>\n" ; print "<strong>$ENV{'SCRIPT_FILENAME'} </strong></p>\n" ; print "<p></td>\n" ; print "</tr>\n" ; print "<tr>\n" ; print "<td>The URL of this script is:<p>\n" ; print "<strong>http://$ENV{'SERVER_NAME'}$ENV{'SCRIPT_NAME'}</strong><p></td>\n" ; print "</tr>\n" ; print "<td>The RELATIVE URL of this script is:<p>\n" ; print "<strong>$ENV{'SCRIPT_NAME'}</strong><p></td>\n" ; print "</tr>\n" ; print "<tr>\n" ; print "<td>Your server consists of:<p>\n" ; print "<strong>$ENV{'SERVER_SOFTWARE'}</strong><p></td>\n" ; print "</tr>\n" ; print "<tr>\n" ; print "<td bgcolor=#C0C0C0><BR><CENTER><B><font color=#000000>VERY detailed info below RECOMMENDED FOR SERVER ADMINS ONLY!:</B></font></CENTER><p></td></tr><HR>\n" ; while(($ekey, $eval) = each(%ENV)){ print "<tr><td><B>$ekey </B>: $eval<br></td></tr>\n"; if ($ekey eq 'PATH') { $path = $eval; } } print <<raw; <hr><TR><TD> <h3>Other Server Info<BR><HR></h3> <tt> raw $uname = `uname -a`; print "<b>Uname info:</b> $uname<hr><br>\n"; $mydir = `ls -ld .`; print "<b>Working directory:</b> $mydir<hr><br>\n"; $mypath = `pwd`; print "<b>Path to current directory:</b> $mypath<hr><br>\n"; $myid = `id`; print "<b>Ids:</b> $myid<hr><br>\n"; $tarfound = $perlfound = $smfound = 0; @paths = split(/:/, $path); foreach (@paths) { if ( -e "$_/tar" ) { $tarfound = 1; print "<b>Tar found:</b> $_/tar<hr><br>\n"; } if ( -e "$_/perl" ) { $perlfound = 1; print "<b>Perl found:</b> $_/perl<hr><br>\n"; $perlversion = `$_/perl -v`; print "<b>Perl version:</b> $perlversion<hr><br>\n"; } if ( -e "$_/sendmail" ) { $smfound = 1; print "<b>Sendmail found:</b> $_/sendmail<hr><br>\n"; } } if ($tarfound == 0) { print "<B>MAY be a problem: tar not found on server PATH</b><hr><br>\n"; } if ($perlfound == 0) { print "<B>MAY be a problem: perl not found on server PATH</b><hr><br>\n"; } if ($smfound == 0) { print "<B>MAY be a problem: sendmail not found on server PATH</B><hr><br>\n"; } print <<raw; </tt> raw print "<tr>\n" ; print "<td><p align=\"center\">Script by \n" ; print "<a href=\"http://www.dotmatrix.net\">Dot Matrix</a>.</font></td>\n" ; print "</tr>\n" ; print "</table>\n" ; print "</center></div>\n" ; print "</body>\n" ; print "</html>\n" ;